var express = require('express');
var router = express.Router();
var loginController = require("../controllers/login_controller")
router.post('/login', function (req, res, next) {
    const {
        SecondaryCollege,
        className,
        student_Number,
        password,
        studentName,
        radio,grade
    } = req.body
    console.log(SecondaryCollege,
        className,
        student_Number,
        password,
        studentName,radio,grade);
    // console.log(password);
    loginController.doStudentLogin({
        SecondaryCollege,
        className,
        student_Number,
        password,
        studentName,
        radio,grade
    }, ["登录失败", "登录成功"], (result) => {
        res.json(result)
    })
});

module.exports = router;